<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=640,target-densitydpi=device-dpi,user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name='author' content='网站建设：智杰科技'>
  <title></title>
  <meta name="keywords" content="">
  <meta name="description" content="">
  <link href="css/public.css" rel="stylesheet" type="text/css" />
  <link href="css/projects.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <header id="publicNav"></header>
  <div class="main-wrap">
    <h6 class="top-info-box">案例赏析</h6>
    <div class="list-box clearfix" id="div_news">
    </div>
    <a class="load-more">
      <i class="iconfont"></i>
      查看更多
    </a>
  </div>
  <div id="publicTool"></div>
  <script src="js/jquery.min.js"></script>
  <script src="js/public.js"></script>
  <script>
    function getCasesList(){
      $.ajax({
        type: 'POST',
        url: ajaxUrlObj['GET_CASES_LIST'],
        data: {page:loadPage,rows:4},
        success: function(rep){
          if (typeof rep === 'string') {
            rep = JSON.parse(rep)
          }
          if (rep.code == 1){
            var data = typeof rep.data === 'string' ? JSON.parse(rep.data).rows :rep.data.rows
            var str = ''
            if(data.length <=0){
              $(".load-more").hide()
              return
            }
            for(var i =0,l=data.length;i<l;i++){
              str+='<a href="project_details.html?id='+data[i].id+'" class="item-box"> <div class="fixed-pic-h"> <img src="'+host+data[i].firstCaseImage+'"> </div> <p class="title">'+data[i].caseName+'</p> </a>'
            }
            $("#div_news").append(str)
          }
        },
        error: function(error){
          console.log(error)
        }
      });
    }
    var loadPage = 1
    $(window).ready(function(){
      getCasesList()
      $(".load-more").on("click",function(){
        loadPage++
        getCasesList()
      })
    })
  </script>
</body>

</html>